package QuicktHit;

import java.util.Scanner;

public class Player {
    private int levelNo;//玩家当前级别号
    private int currScore;//玩家当前级别积分
    private long startTime;//当前级别开始时间
    private long elaspsedTime;//当前级别已用时间

    public void play(){
        Scanner input=new Scanner(System.in);
        Game game=new Game(this);
        for (int i=0;i<LevelParam.levels.length;i++){
            this.levelNo+=1;
            this.startTime=System.currentTimeMillis();
            this.currScore=0;
            for (int j=0;j<LevelParam.levels[levelNo-1].getStrTimse();j++){
                String out=game.printStr();
                //接受用户输入
                String in=input.next();
                game.printResult(out,in);
            }
        }

    }

    public Player(int levelNo, int currScore, long startTime, long elaspsedTime) {
        this.levelNo = levelNo;
        this.currScore = currScore;
        this.startTime = startTime;
        this.elaspsedTime = elaspsedTime;
    }

    public Player() {
    }

    public int getLevelNo() {
        return levelNo;
    }

    public void setLevelNo(int levelNo) {
        this.levelNo = levelNo;
    }

    public int getCurrScore() {
        return currScore;
    }

    public void setCurrScore(int currScore) {
        this.currScore = currScore;
    }

    public long getStartTime() {
        return startTime;
    }

    public void setStartTime(long startTime) {
        this.startTime = startTime;
    }

    public long getElaspsedTime() {
        return elaspsedTime;
    }

    public void setElaspsedTime(long elaspsedTime) {
        this.elaspsedTime = elaspsedTime;
    }
}
